<?php

require_once('../../connection/_dbconnect_.php');

function Mlogin($username, $password){

	$arr = array();
	
	$sql = "select iduser,password,fullname,enabled,idrole from user where iduser ='$username' and password='$password'";
	
	$result = mysql_query($sql) or die("Query: $sql \n\n".mysql_error());
	while($obj = mysql_fetch_object($result)){
	
		$arr[] = $obj->iduser;
		$arr[] = $obj->password;
		$arr[] = $obj->fullname;
		$arr[] = $obj->enabled;
		$arr[] = $obj->idrole;
	}
	
	return $arr;
}



?>